package system.entity;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import lombok.Data;

@Table(name = "sys_operation")
@Data
public class SysOperation implements Serializable {
    /**
     * ID
     */
    @Id
    @Column(name = "id")
    @ApiModelProperty(value = "ID")
    private Long id;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 账号
     */
    @Column(name = "username")
    @ApiModelProperty(value = "账号")
    private String username;

    /**
     * 账号ID
     */
    @Column(name = "user_id")
    @ApiModelProperty(value = "账号ID")
    private Long userId;

    /**
     * 操作IP
     */
    @Column(name = "ipaddr")
    @ApiModelProperty(value = "操作IP")
    private String ipaddr;

    /**
     * 浏览器
     */
    @Column(name = "browser")
    @ApiModelProperty(value = "浏览器")
    private String browser;

    /**
     * 操作系统
     */
    @Column(name = "os")
    @ApiModelProperty(value = "操作系统")
    private String os;

    /**
     * 操作状态(0:失败，1:成功)
     */
    @Column(name = "status")
    @ApiModelProperty(value = "操作状态(0:失败，1:成功)")
    private Integer status;

    /**
     * 操作功能
     */
    @Column(name = "operate_name")
    @ApiModelProperty(value = "操作功能")
    private String operateName;

    /**
     * 请求方法
     */
    @Column(name = "request_method")
    @ApiModelProperty(value = "请求方法")
    private String requestMethod;

    /**
     * 请求路径
     */
    @Column(name = "request_path")
    @ApiModelProperty(value = "请求路径")
    private String requestPath;

    /**
     * 异常描述
     */
    @Column(name = "error_msg")
    @ApiModelProperty(value = "异常描述")
    private String errorMsg;

    /**
     * 请求参数
     */
    @Column(name = "request_param")
    @ApiModelProperty(value = "请求参数")
    private String requestParam;

    /**
     * 请求数据
     */
    @Column(name = "request_data")
    @ApiModelProperty(value = "请求数据")
    private String requestData;

    /**
     * 响应数据
     */
    @Column(name = "response_data")
    @ApiModelProperty(value = "响应数据")
    private String responseData;

    private static final long serialVersionUID = 1L;

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", createTime=").append(createTime);
        sb.append(", username=").append(username);
        sb.append(", userId=").append(userId);
        sb.append(", ipaddr=").append(ipaddr);
        sb.append(", browser=").append(browser);
        sb.append(", os=").append(os);
        sb.append(", status=").append(status);
        sb.append(", operateName=").append(operateName);
        sb.append(", requestMethod=").append(requestMethod);
        sb.append(", requestPath=").append(requestPath);
        sb.append(", errorMsg=").append(errorMsg);
        sb.append(", requestParam=").append(requestParam);
        sb.append(", requestData=").append(requestData);
        sb.append(", responseData=").append(responseData);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}